<?php 
    Zend_Loader::loadClass('calendario','library');
    $sessao = new Zend_Session_Namespace('Parametros');
?>

<header>
    <?php
    $link = '';
    $posicao = '68';
    $db = Zend_Db_Table_Abstract::getDefaultAdapter();
    $objs = $db->fetchAll('SELECT SQL_CACHE * FROM FULLBANNER WHERE BAN_STA = 1 ORDER BY BAN_ORD ASC');   
    foreach($objs as $key => $obj) {
        $img = glob('public/upload/fullbanner/'.$obj['BAN_ID'].'.*');
        @$img = $img[0];
        $style = '';
        $class = '';
        
        if($key > 0) $style = 'display: none;';
        if($key == 0) $class = 'class="action"';
        
        $alink .= '<a '.$class.' id="lnkb'.$key.'" itemref="bimg'.$key.'" itemid="'.$key.'" href="javascript:void(0)"></a>';
        $imgs .= '<img id="bimg'.$key.'" src="'.$this->urlbase.'/'.str_replace('.','_sld.',$img).'" style="margin-left: '.$posicao.'px" alt="'.$obj['BAN_DSC'].'" >';
        $posicao += 34; 
    ?> 
    <div id="banner<?php echo $key; ?>" class="banner" style="background-image: url('<?php echo $this->urlbase.'/'.$img; ?>');<?php echo $style; ?>"></div>
    <?php } ?>
    
    <div id="st-tp-content">
        <nav id="st-tp-menu">
            <ul>
                <li><a href="<?php echo $this->urlbase; ?>/">início</a></li>
                <li><a href="<?php echo $this->urlbase; ?>/sobre">sobre</a></li>
                <li><a href="<?php echo $this->urlbase; ?>/cursos">cursos</a></li>
                <li><a href="<?php echo $this->urlbase; ?>/galeriafotos">galeria de fotos</a></li>
                <li><a href="<?php echo $this->urlbase; ?>/blogdapiti">blog da piti</a></li>
                <li><a href="<?php echo $this->urlbase; ?>/contato">contato</a></li>
                <li class="mnfacebook"><a href="<?php echo $sessao->parametros['PAR_FAC']; ?>" target="_blank" alt="Facebook">&nbsp;</a></li>
                <li class="mninstagram"><a href="<?php echo $sessao->parametros['PAR_INS']; ?>" target="_blank" alt="Instagram">&nbsp;</a></li>
            </ul>
        </nav>    
        <div id="st-tp-cnt-lg">
            <div id="st-tp-lg">
                <div class="logo"><h1 title="<?php echo $this->titulo; ?>"><a href="<?php echo $this->urlbase.'/'; ?>" title="<?php echo $this->titulo; ?>"><?php echo $this->titulo; ?></a></h1></div>
                <div class="st_login">
                    <div class="tl">Área do Aluno</div>
                    <form id="formlogin" method="post" action="<?php echo $this->urlbase.'/ead/auth/login'; ?>">
                        <input type="text" id="f_usuario" name="usuario" placeholder="usuário" value="">
                        <input type="password" id="f_senha" name="senha" placeholder="senha" value="">
                        <a href="<?php echo $this->urlbase.'/esqueciminhasenha'; ?>" class="esq_senha">esqueci minha senha</a> <input type="submit" name="entrar" value="entrar" />
                    </form>    
                </div>
            </div>
            <div class="lnkitg">
               <div class="imgs"><?php echo $imgs; ?></div>
               <?php echo $alink; ?>
            </div>        
        </div>       
    </div> 
</header>




